package com.samoiloff.util.data {
	import String;
	import XML;
	import XMLList;
	import com.samoiloff.util.data.PropItem;

	/**
	 * @author NM Group
	 */
	public class BaseLangItem extends PropItem {
		public function BaseLangItem() {
			super();
		}
		
		public function update(xml:XML):void {
			var children:XMLList = xml.elements();
			for each (var childXML:XML in children) {
				if (!childXML.hasComplexContent() && String(childXML.@ids).length == 0) {
					setValueByProp(childXML.name(), childXML.text());
				}
			}
		}
		
		override public function getValueByProp(propName:String):* {
			var str:String = super.getValueByProp(propName);
			if (str) {
				return str;
			}
			return propName.toUpperCase();
		}
	}
}
